package game;

import game.Card.Suit;
import game.Card.Value;
import java.util.*;

public class DeckCreator {
	public static Stack<Card> createDeck(){
		ArrayList<Card> deck = new ArrayList<Card>();
		Stack<Card> ret = new Stack<Card>();
		for (Suit s: Suit.values()){
			for (Value v : Value.values()){
				deck.add(new Card(s,v));
			}
		}
		Random rand = new Random();
		while (!deck.isEmpty()){
			int idx = rand.nextInt(deck.size());
			ret.push(deck.get(idx));
			deck.remove(idx);
		}
		return ret;
	}
}
